#include <REGX52.H>
#include "Timer.h"
#include "MatrixKey.h"
void Timer0_Init() // 1毫秒@11.0592MHz
{
    TMOD &= 0xF0;
    TMOD |= 0x01;
    TF0 = 0;
    TR0 = 1;
    TL0 = 0x66; 
    TH0 = 0xFC;
    ET0=1;  //开启中断
    EA=1;
    PT0=0;
}

unsigned int Timer0_Count=0;
void Timer0_Rountine(void)  interrupt 1
{
    TL0 = 0x66; 
    TH0 = 0xFC;
    Timer0_Count++;
    if(Timer0_Count>=20)
    {
        Timer0_Count=0;
        MatrixKey_Loop();
    }
}
